<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Vue 测试实例 - 菜鸟教程(runoob.com)</title>
<script src="https://cdn.staticfile.org/vue/3.2.36/vue.global.min.js"></script>
</head>

<body>
<div id="hello-vue" class="demo">

</div>

<script>
var Un = {
  data(){
    return {
      name:'nsu',
      url:'https://www.neusoft.com/cn/'
    }
  },
  computed:{
    UnSite:{
        // getter
        get: function(){
            return this.$data.name + '_' + this.url
        },
        set: function(value){
            ValueArr = value.split('_')
            console.log("value:",value)
            this.name = ValueArr[0]
            this.url = ValueArr[ValueArr.length-1]

        }
    }
  }
}

var app =  Vue.createApp(Un).mount('#hello-vue')
document.write("-----------------------------")
document.write("<br>" + "name:" + app.name)
document.write("<br>" + "url:" + app.url + "<br>" )
document.write("-----------------------------")

app.UnSite = "cdu_https://www.cdu.edu.cn"

document.write("<br>" + "name:" + app.name)
document.write("<br>" + "url:" + app.url )


</script>
</body>
</html>
